package com.liuhongwei.test.controller;

import javax.annotation.Resource;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.PostMapping;
import com.liuhongwei.test.entity.vo.JSONRequest;
import com.liuhongwei.test.entity.vo.JSONResponse;
import com.liuhongwei.test.service.SysCountryService;

/**
 * 国家表Controller
 * @auther: 刘洪玮
 * @date: 2025-07-24 11:32
 */
@RestController
@RequestMapping("/sysCountry/")
public class SysCountryController {

	@Resource
	private SysCountryService sysCountryService;

	/**
	 * 页面分页查询
	 */
	@PostMapping(value = "/list", produces = {"application/json;charset=UTF-8"})
	public JSONResponse getPage(@RequestBody JSONRequest jsonRequest) {
		return sysCountryService.getPage(jsonRequest);
	}

	/**
	 * 页面新增
	 */
	@PostMapping(value = "/add", produces = {"application/json;charset=UTF-8"})
	public JSONResponse add(@RequestBody JSONRequest jsonRequest) {
		return sysCountryService.add(jsonRequest);
	}

	/**
	 * 页面更新
	 */
	@PostMapping(value = "/update", produces = {"application/json;charset=UTF-8"})
	public JSONResponse update(@RequestBody JSONRequest jsonRequest) {
		return sysCountryService.update(jsonRequest);
	}

	/**
	 * 页面删除
	 */
	@PostMapping(value = "/delete", produces = {"application/json;charset=UTF-8"})
	public JSONResponse delete(@RequestBody JSONRequest jsonRequest) {
		return sysCountryService.delete(jsonRequest);
	}

	/**
	 * 页面详情
	 */
	@PostMapping(value = "/get", produces = {"application/json;charset=UTF-8"})
	public JSONResponse get(@RequestBody JSONRequest jsonRequest) {
		return sysCountryService.get(jsonRequest);
	}

}